A dual fuel internal combustion or a gaseous fuel engine may be used to power various types of machines. In case of duel fuel engine, the engine typically includes a fuel supply system having a gaseous fuel supply system for supplying gaseous fuel and a liquid fuel supply system for supplying liquid fuel to the engine. The gaseous fuel supply system may be associated with an inert gas supply system that may be used for flushing gaseous fuel present in a gaseous fuel line after termination of a gaseous fuel operation of the engine or during a transition from a gaseous fuel operation to a liquid fuel operation of the engine. After flushing gaseous fuel, the mixture of gaseous fuel and inert gas is typically vented to atmosphere. However, such practice of releasing gaseous fuel to atmosphere may not be desirable as it leads to atmospheric pollution.